package com.hzncc.flowable_diboot.entity.refundmanage;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.lang.Double;
import java.math.BigDecimal;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.diboot.core.util.D;
import com.diboot.core.entity.BaseModel;
import com.diboot.core.entity.BaseEntity;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
* 合同退款 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-11-12
* Copyright © MyCorp
*/
@TableName("mdl_refund_contract")
@Getter @Setter @Accessors(chain = true)
public class RefundContract extends BaseModel {
    private static final long serialVersionUID = 1678112569006126130L;
     /**
     * 租户
     */
     @NotNull(message = "租户不能为空")
     @TableField()
     private String tenantId;

     /**
     * 退款登记ID
     */
     @Length(max=100, message="退款登记ID长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String refundRegisterId;

     /**
     * 退款类型
     */
     @TableField()
     private String refundType;

     /**
     * 成本中心
     */
     @TableField()
     private String costCenter;

     /**
     * 销售区域
     */
     @TableField()
     private String salesArea;

     /**
     * Sap客户ID
     */
     @Length(max=100, message="Sap客户ID长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String sapCustomerId;

     /**
     * 合同编号
     */
     @Length(max=100, message="合同编号长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String contractCode;

     /**
     * 直退金额
     */
     @TableField()
     private BigDecimal directRefundAmount;

     /**
      * 合同退款类别
      */
     @TableField()
     private String refundContractCategory;

     /**
     * 销售员
     */
     @Length(max=100, message="销售员长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String saler;

     /**
     * 直退备注
     */
     @Length(max=100, message="直退备注长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String directRemark;

     /**
     * 合同金额
     */
     @TableField()
     private BigDecimal contractAmount;

     /**
     * 合同已收金额
     */
     @TableField()
     private BigDecimal contractReceivedAmount;

     /**
     * 合同剩余金额
     */
     @TableField()
     private BigDecimal contractRemainingAmount;

     /**
     * 折扣
     */
     @TableField()
     private BigDecimal discount;

//     /**
//     * 退款金额
//     */
//     @TableField()
//     private BigDecimal refundAmount;
//
//     /**
//     * 已退款金额
//     */
//     @TableField()
//     private BigDecimal returnAmount;
//
//     /**
//     * 未退款金额
//     */
//     @TableField()
//     private BigDecimal noReturnAmount;

     /**
     * 本次退款金额
     */
     @TableField()
     private BigDecimal currentRefundAmount;

     /**
     * 退款日期
     */
     @TableField()
     private LocalDateTime refundTime;

     /**
     * 传阅
     */
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String copyRead;

     /**
     * 备注
     */
     @Length(max=100, message="备注长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String remark;

     /**
     * 审核意见
     */
     @Length(max=100, message="审核意见长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String auditReason;

     /**
     * 流程实例ID
     */
     @Length(max=100, message="流程实例ID长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String instanceId;

     /**
     * 流程状态
     */
     @Length(max=100, message="流程状态长度应小于100")
     @BindQuery(comparison = Comparison.LIKE)
     @TableField()
     private String processState;


}